//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.hujun.utils.tree;

import java.util.List;

public class TreeDTO<T extends Tree<T, K>, K> implements Tree<T, K> {
    private K id;
    private K parentId;
    private String parentIds;
    private Integer level;
    private Boolean hasChildren;
    private List<T> children;

    public TreeDTO() {
    }

    public K getId() {
        return this.id;
    }

    public K getParentId() {
        return this.parentId;
    }

    public String getParentIds() {
        return this.parentIds;
    }

    public Integer getLevel() {
        return this.level;
    }

    public Boolean getHasChildren() {
        return this.hasChildren;
    }

    public List<T> getChildren() {
        return this.children;
    }

    public void setId(K id) {
        this.id = id;
    }

    public void setParentId(K parentId) {
        this.parentId = parentId;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    public void setChildren(List<T> children) {
        this.children = children;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof TreeDTO)) {
            return false;
        } else {
            TreeDTO<?, ?> other = (TreeDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$level = this.getLevel();
                Object other$level = other.getLevel();
                if (this$level == null) {
                    if (other$level != null) {
                        return false;
                    }
                } else if (!this$level.equals(other$level)) {
                    return false;
                }

                Object this$hasChildren = this.getHasChildren();
                Object other$hasChildren = other.getHasChildren();
                if (this$hasChildren == null) {
                    if (other$hasChildren != null) {
                        return false;
                    }
                } else if (!this$hasChildren.equals(other$hasChildren)) {
                    return false;
                }

                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                label62: {
                    Object this$parentId = this.getParentId();
                    Object other$parentId = other.getParentId();
                    if (this$parentId == null) {
                        if (other$parentId == null) {
                            break label62;
                        }
                    } else if (this$parentId.equals(other$parentId)) {
                        break label62;
                    }

                    return false;
                }

                label55: {
                    Object this$parentIds = this.getParentIds();
                    Object other$parentIds = other.getParentIds();
                    if (this$parentIds == null) {
                        if (other$parentIds == null) {
                            break label55;
                        }
                    } else if (this$parentIds.equals(other$parentIds)) {
                        break label55;
                    }

                    return false;
                }

                Object this$children = this.getChildren();
                Object other$children = other.getChildren();
                if (this$children == null) {
                    if (other$children != null) {
                        return false;
                    }
                } else if (!this$children.equals(other$children)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof TreeDTO;
    }

    public int hashCode() {
        int result = 1;
        Object $level = this.getLevel();
        result = result * 59 + ($level == null ? 43 : $level.hashCode());
        Object $hasChildren = this.getHasChildren();
        result = result * 59 + ($hasChildren == null ? 43 : $hasChildren.hashCode());
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $parentId = this.getParentId();
        result = result * 59 + ($parentId == null ? 43 : $parentId.hashCode());
        Object $parentIds = this.getParentIds();
        result = result * 59 + ($parentIds == null ? 43 : $parentIds.hashCode());
        Object $children = this.getChildren();
        result = result * 59 + ($children == null ? 43 : $children.hashCode());
        return result;
    }

    public String toString() {
        Object var10000 = this.getId();
        return "TreeDTO(id=" + var10000 + ", parentId=" + this.getParentId() + ", parentIds=" + this.getParentIds() + ", level=" + this.getLevel() + ", hasChildren=" + this.getHasChildren() + ", children=" + this.getChildren() + ")";
    }
}
